package cn.rongdao.jrkabao.model.cashadvance;

import com.mifengkong.frtools.http.request.HttpFunction;
import com.mifengkong.frtools.util.FRString;

import java.util.Map;

import cn.rongdao.jrkabao.model.api.BaseKaMaoModel;
import io.reactivex.Observable;
import io.reactivex.Observer;

/**
 * Created by jack on 2017/6/3
 */

public class CashAddDepositCardModel extends BaseKaMaoModel {

    public static CashAddDepositCardModel getInstance() {
        return getPresent(CashAddDepositCardModel.class);
    }

    public void execute(String institutionId, Map<String, String> map, Observer<String> observer) {
        addParamStrings("institution_id", FRString.valueOf(institutionId));
        addParamStrings(map);
        Observable<String> observable = mServletApi.addDepositCardForCash(mParams).map(new HttpFunction<String>());
        toSubscribe(observable, observer);
    }

}